[Scummvm-cvs-logs] scummvm master -> dbba1e08fedf9a345b6e6765c0dcd18e3b49307b

fuzzie fuzzie at fuzzie.org
Fri Nov 4 11:12:25 CET 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
dbba1e08fe COMPOSER: Fix reading rollover scripts for V1 buttons.


Commit: dbba1e08fedf9a345b6e6765c0dcd18e3b49307b
    https://github.com/scummvm/scummvm/commit/dbba1e08fedf9a345b6e6765c0dcd18e3b49307b
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2011-11-04T03:10:56-07:00

Commit Message:
COMPOSER: Fix reading rollover scripts for V1 buttons.

Changed paths:
    engines/composer/composer.cpp



diff --git a/engines/composer/composer.cpp b/engines/composer/composer.cpp
index eb7df95..595c2ec 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();
 	}






More information about the Scummvm-git-logs mailing list