aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAlyssa Milburn2011-11-04 11:10:56 +0100
committerAlyssa Milburn2011-11-04 11:10:56 +0100
commitdbba1e08fedf9a345b6e6765c0dcd18e3b49307b (patch)
tree846c72ae3726717588c076c973ccc2a819ee23e5 /engines
parent48d9c3d155a21ed26309df6119e440e8a39c6498 (diff)
downloadscummvm-rg350-dbba1e08fedf9a345b6e6765c0dcd18e3b49307b.tar.gz
scummvm-rg350-dbba1e08fedf9a345b6e6765c0dcd18e3b49307b.tar.bz2
scummvm-rg350-dbba1e08fedf9a345b6e6765c0dcd18e3b49307b.zip
COMPOSER: Fix reading rollover scripts for V1 buttons.
Diffstat (limited to 'engines')
-rw-r--r--engines/composer/composer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index eb7df95ec3..595c2eca46 100644
--- a/engines/composer/composer.cpp
+++ b/engines/composer/composer.cpp
@@ -472,13 +472,14 @@ Button::Button(Common::SeekableReadStream *stream, uint16 id, uint gameType) {
_type = stream->readUint16LE();
_active = (_type & 0x8000) ? true : false;
+ bool hasRollover = (gameType == GType_ComposerV1) && (_type & 0x4000);
_type &= 0xfff;
debug(9, "button %d: type %d, active %d", id, _type, _active);
- uint16 flags = 0;
uint16 size = 4;
if (gameType == GType_ComposerV1) {
- flags = stream->readUint16LE();
+ stream->skip(2);
+
_zorder = 0;
_scriptId = stream->readUint16LE();
_scriptIdRollOn = 0;
@@ -515,7 +516,7 @@ Button::Button(Common::SeekableReadStream *stream, uint16 id, uint gameType) {
error("unknown button type %d", _type);
}
- if (flags & 0x40) {
+ if (hasRollover) {
_scriptIdRollOn = stream->readUint16LE();
_scriptIdRollOff = stream->readUint16LE();
}