diff options
author | Paul Gilbert | 2014-08-13 22:23:08 -0400 |
---|---|---|
committer | Paul Gilbert | 2014-08-13 22:23:08 -0400 |
commit | 28bfe7374930cd78f722451b8754822a11dd500d (patch) | |
tree | 0fd59d1e54f096dbcfd89aeb4b146c6d27f82e48 /engines/access/scripts.cpp | |
parent | ed645e435a641cc3be95bfe946d2c08d2ab3836b (diff) | |
download | scummvm-rg350-28bfe7374930cd78f722451b8754822a11dd500d.tar.gz scummvm-rg350-28bfe7374930cd78f722451b8754822a11dd500d.tar.bz2 scummvm-rg350-28bfe7374930cd78f722451b8754822a11dd500d.zip |
ACCESS: Implemented cmdSpecial script opcode
Diffstat (limited to 'engines/access/scripts.cpp')
-rw-r--r-- | engines/access/scripts.cpp | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/engines/access/scripts.cpp b/engines/access/scripts.cpp index 19633544f4..0e1d421c34 100644 --- a/engines/access/scripts.cpp +++ b/engines/access/scripts.cpp @@ -326,7 +326,26 @@ void Scripts::cmdRemoveLast() { --_vm->_numAnimTimers; } -void Scripts::CMDSPECIAL() { error("TODO"); } +void Scripts::CMDSPECIAL() { + _specialFunction = _data->readUint16LE(); + int p1 = _data->readUint16LE(); + int p2 = _data->readUint16LE(); + + if (_specialFunction == 1) { + if (_vm->_establishTable[p2] == 1) + return; + + _vm->_screen->savePalette(); + } + + executeSpecial(_specialFunction, p1, p2); + + if (_specialFunction == 1) { + _vm->_screen->restorePalette(); + _vm->_room->_function = 3; + } +} + void Scripts::CMDSETCYCLE() { error("TODO"); } void Scripts::CMDCYCLE() { error("TODO"); } void Scripts::CMDCHARSPEAK() { error("TODO"); } |