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

fuzzie fuzzie at fuzzie.org
Sun Jul 8 09:59:15 CEST 2012


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:
e265be07bf MOHAWK: Run animations attached to LiveText items.


Commit: e265be07bfb03ee9686ea27b2e12bf4d61ad3732
    https://github.com/scummvm/scummvm/commit/e265be07bfb03ee9686ea27b2e12bf4d61ad3732
Author: Alyssa Milburn (fuzzie at fuzzie.org)
Date: 2012-07-08T00:54:36-07:00

Commit Message:
MOHAWK: Run animations attached to LiveText items.

Should fix bug #3541294.

Changed paths:
    engines/mohawk/livingbooks.cpp
    engines/mohawk/livingbooks.h



diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 708478a..f5e5e7d 100644
--- a/engines/mohawk/livingbooks.cpp
+++ b/engines/mohawk/livingbooks.cpp
@@ -3378,11 +3378,10 @@ void LBLiveTextItem::readData(uint16 type, uint16 size, Common::MemoryReadStream
 			LiveTextWord word;
 			word.bounds = _vm->readRect(stream);
 			word.soundId = stream->readUint16();
-			// TODO: unknowns
-			uint16 unknown1 = stream->readUint16();
-			uint16 unknown2 = stream->readUint16();
-			debug(4, "Word: (%d, %d) to (%d, %d), sound %d, unknowns %04x, %04x",
-				word.bounds.left, word.bounds.top, word.bounds.right, word.bounds.bottom, word.soundId, unknown1, unknown2);
+			word.itemType = stream->readUint16();
+			word.itemId = stream->readUint16();
+			debug(4, "Word: (%d, %d) to (%d, %d), sound %d, item %d (type %d)",
+				word.bounds.left, word.bounds.top, word.bounds.right, word.bounds.bottom, word.soundId, word.itemId, word.itemType);
 			_words.push_back(word);
 		}
 
@@ -3531,6 +3530,11 @@ void LBLiveTextItem::handleMouseDown(Common::Point pos) {
 			_currentWord = i;
 			_vm->playSound(this, soundId);
 			paletteUpdate(_currentWord, true);
+
+			// TODO: check this in RE
+			LBItem *item = _vm->getItemById(_words[i].itemId);
+			if (item)
+				item->togglePlaying(false);
 			return;
 		}
 	}
diff --git a/engines/mohawk/livingbooks.h b/engines/mohawk/livingbooks.h
index 91d6a8c..76da7d8 100644
--- a/engines/mohawk/livingbooks.h
+++ b/engines/mohawk/livingbooks.h
@@ -537,6 +537,9 @@ protected:
 struct LiveTextWord {
 	Common::Rect bounds;
 	uint16 soundId;
+
+	uint16 itemType;
+	uint16 itemId;
 };
 
 struct LiveTextPhrase {






More information about the Scummvm-git-logs mailing list