diff options
author | johndoe123 | 2015-11-30 17:07:59 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | f692e0acfbe1e0a2266502348da7576a0c4f89a1 (patch) | |
tree | 2921fe424ec72880b298a2580fc1edf925574632 /engines/illusions/duckman | |
parent | 9c0ef1bb11508f15bd4e5b710ccbbba6dfa5341e (diff) | |
download | scummvm-rg350-f692e0acfbe1e0a2266502348da7576a0c4f89a1.tar.gz scummvm-rg350-f692e0acfbe1e0a2266502348da7576a0c4f89a1.tar.bz2 scummvm-rg350-f692e0acfbe1e0a2266502348da7576a0c4f89a1.zip |
ILLUSIONS: DUCKMAN: Implement special opcodes 16001D, 16001E, 16001F and related code
Diffstat (limited to 'engines/illusions/duckman')
-rw-r--r-- | engines/illusions/duckman/duckman_specialcode.cpp | 39 | ||||
-rw-r--r-- | engines/illusions/duckman/duckman_specialcode.h | 5 |
2 files changed, 35 insertions, 9 deletions
diff --git a/engines/illusions/duckman/duckman_specialcode.cpp b/engines/illusions/duckman/duckman_specialcode.cpp index d0d8a5c798..4cb20fc4b0 100644 --- a/engines/illusions/duckman/duckman_specialcode.cpp +++ b/engines/illusions/duckman/duckman_specialcode.cpp @@ -3,7 +3,7 @@ * ScummVM is the legal property of its developers, whose names * are too numerous to list here. Please refer to the COPYRIGHT * file distributed with this source distribution. - * + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 @@ -66,6 +66,9 @@ void DuckmanSpecialCode::init() { SPECIAL(0x00160010, spcCenterNewspaper); SPECIAL(0x00160014, spcUpdateObject272Sequence); SPECIAL(0x0016001C, spcSetCursorInventoryMode); + SPECIAL(0x0016001D, spcCenterCurrentScreenText); + SPECIAL(0x0016001E, spcSetDefaultTextCoords); + SPECIAL(0x0016001F, spcSetTextDuration); } #undef SPECIAL @@ -157,13 +160,6 @@ void DuckmanSpecialCode::spcCenterNewspaper(OpCall &opCall) { _vm->notifyThreadId(opCall._threadId); } -void DuckmanSpecialCode::spcSetCursorInventoryMode(OpCall &opCall) { - ARG_BYTE(mode); - ARG_BYTE(value); - _vm->setCursorInventoryMode(mode, value); - _vm->notifyThreadId(opCall._threadId); -} - void DuckmanSpecialCode::spcUpdateObject272Sequence(OpCall &opCall) { byte flags = 0; uint32 sequenceId; @@ -206,4 +202,31 @@ void DuckmanSpecialCode::spcUpdateObject272Sequence(OpCall &opCall) { control->startSequenceActor(sequenceId, 2, opCall._threadId); } +void DuckmanSpecialCode::spcSetCursorInventoryMode(OpCall &opCall) { + ARG_BYTE(mode); + ARG_BYTE(value); + _vm->setCursorInventoryMode(mode, value); + _vm->notifyThreadId(opCall._threadId); +} + +void DuckmanSpecialCode::spcCenterCurrentScreenText(OpCall &opCall) { + WidthHeight dimensions; + _vm->getDefaultTextDimensions(dimensions); + Common::Point pt(160, dimensions._height / 2 + 8); + _vm->setDefaultTextPosition(pt); + _vm->notifyThreadId(opCall._threadId); +} + +void DuckmanSpecialCode::spcSetDefaultTextCoords(OpCall &opCall) { + _vm->setDefaultTextCoords(); + _vm->notifyThreadId(opCall._threadId); +} + +void DuckmanSpecialCode::spcSetTextDuration(OpCall &opCall) { + ARG_INT16(kind); + ARG_INT16(duration); + _vm->setTextDuration(kind, duration); + _vm->notifyThreadId(opCall._threadId); +} + } // End of namespace Illusions diff --git a/engines/illusions/duckman/duckman_specialcode.h b/engines/illusions/duckman/duckman_specialcode.h index 53012d68cd..c4dfc3698c 100644 --- a/engines/illusions/duckman/duckman_specialcode.h +++ b/engines/illusions/duckman/duckman_specialcode.h @@ -67,8 +67,11 @@ public: void spcSetPropertyTimer(OpCall &opCall); void spcRemovePropertyTimer(OpCall &opCall); void spcCenterNewspaper(OpCall &opCall); - void spcSetCursorInventoryMode(OpCall &opCall); void spcUpdateObject272Sequence(OpCall &opCall); + void spcSetCursorInventoryMode(OpCall &opCall); + void spcCenterCurrentScreenText(OpCall &opCall); + void spcSetDefaultTextCoords(OpCall &opCall); + void spcSetTextDuration(OpCall &opCall); }; |