aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions/duckman/duckman_specialcode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/illusions/duckman/duckman_specialcode.cpp')
-rw-r--r--engines/illusions/duckman/duckman_specialcode.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/engines/illusions/duckman/duckman_specialcode.cpp b/engines/illusions/duckman/duckman_specialcode.cpp
index b23cc44966..6b67f1214f 100644
--- a/engines/illusions/duckman/duckman_specialcode.cpp
+++ b/engines/illusions/duckman/duckman_specialcode.cpp
@@ -67,6 +67,7 @@ void DuckmanSpecialCode::init() {
SPECIAL(0x0016000F, spcUpdateTeleporterPosition);
SPECIAL(0x00160010, spcCenterNewspaper);
SPECIAL(0x00160012, spcStopScreenShaker);
+ SPECIAL(0x00160013, spcIncrCounter);
SPECIAL(0x00160014, spcUpdateObject272Sequence);
SPECIAL(0x0016001C, spcSetCursorInventoryMode);
SPECIAL(0x0016001D, spcCenterCurrentScreenText);
@@ -226,6 +227,20 @@ void DuckmanSpecialCode::spcStopScreenShaker(OpCall &opCall) {
_vm->notifyThreadId(opCall._threadId);
}
+void DuckmanSpecialCode::spcIncrCounter(OpCall &opCall) {
+ ARG_BYTE(maxCount);
+ ARG_BYTE(incr);
+ _vm->_scriptResource->_properties.set(0x000E0088, false);
+ if (incr) {
+ _counter += incr;
+ if (_counter >= maxCount)
+ _vm->_scriptResource->_properties.set(0x000E0088, true);
+ } else {
+ _counter = 0;
+ }
+ _vm->notifyThreadId(opCall._threadId);
+}
+
void DuckmanSpecialCode::spcUpdateObject272Sequence(OpCall &opCall) {
byte flags = 0;
uint32 sequenceId;