aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsylvaintv2012-04-27 22:59:48 +0200
committerEugene Sandulenko2018-03-28 17:36:57 +0200
commit977c07ba70e8d3ebdd86b3ddf30903762e5d7ce0 (patch)
tree5172670b54300ff03309fa2b0fbeb4b9eb13b638
parent348d46d02d505d6cf8d95f3c23c156d77b1ca4fc (diff)
downloadscummvm-rg350-977c07ba70e8d3ebdd86b3ddf30903762e5d7ce0.tar.gz
scummvm-rg350-977c07ba70e8d3ebdd86b3ddf30903762e5d7ce0.tar.bz2
scummvm-rg350-977c07ba70e8d3ebdd86b3ddf30903762e5d7ce0.zip
LILLIPUT: Implements 2 opcodes
-rw-r--r--engines/lilliput/script.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/engines/lilliput/script.cpp b/engines/lilliput/script.cpp
index 6c6bef06ed..bd67783f1b 100644
--- a/engines/lilliput/script.cpp
+++ b/engines/lilliput/script.cpp
@@ -1572,7 +1572,12 @@ void LilliputScript::OC_sub17B03() {
}
void LilliputScript::OC_getRandom_type2() {
- warning("OC_getRandom_type2");
+ debugC(1, kDebugScript, "OC_getRandom_type2()");
+
+ byte* bufPtr = getBuffer215Ptr();
+ int maxVal = _currScript->readUint16LE();
+ int randomVal = _vm->_rnd->getRandomNumber(maxVal);
+ *bufPtr = randomVal;
}
void LilliputScript::OC_sub17A66() {
@@ -1718,7 +1723,16 @@ void LilliputScript::OC_sub17C0E() {
}
void LilliputScript::OC_sub17C55() {
- warning("OC_sub17C55");
+ debugC(1, kDebugScript, "OC_sub17C55()");
+ int var1 = getValue1();
+ int var2 = getValue1();
+
+ int var3 = _currScript->readUint16LE();
+ int var4 = _currScript->readUint16LE();
+
+ _vm->_rulesBuffer2_5[var2] = var1 & 0xFF;
+ _vm->_rulesBuffer2_6[var2] = var3 & 0xFF;
+ _vm->_rulesBuffer2_7[var2] = var4 & 0xFF;
}
void LilliputScript::OC_sub17C76() {
warning("OC_sub17C76");