aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorAlyssa Milburn2012-07-08 09:54:09 +0200
committerAlyssa Milburn2012-07-08 09:54:36 +0200
commite265be07bfb03ee9686ea27b2e12bf4d61ad3732 (patch)
tree462cb609381f297537f81f8a12b7efb977f60047 /engines
parent4f9b9ce3cc263b5e5ad9a223ca2a01f3b9ddaf39 (diff)
downloadscummvm-rg350-e265be07bfb03ee9686ea27b2e12bf4d61ad3732.tar.gz
scummvm-rg350-e265be07bfb03ee9686ea27b2e12bf4d61ad3732.tar.bz2
scummvm-rg350-e265be07bfb03ee9686ea27b2e12bf4d61ad3732.zip
MOHAWK: Run animations attached to LiveText items.
Should fix bug #3541294.
Diffstat (limited to 'engines')
-rw-r--r--engines/mohawk/livingbooks.cpp14
-rw-r--r--engines/mohawk/livingbooks.h3
2 files changed, 12 insertions, 5 deletions
diff --git a/engines/mohawk/livingbooks.cpp b/engines/mohawk/livingbooks.cpp
index 708478a6d8..f5e5e7d7b4 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 91d6a8cd30..76da7d8219 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 {