aboutsummaryrefslogtreecommitdiff
path: root/engines/mohawk/riven_card.cpp
diff options
context:
space:
mode:
authorBastien Bouclet2017-07-14 19:45:23 +0200
committerBastien Bouclet2017-07-14 19:45:23 +0200
commitef42fd3476eb5da3a832d09b35e1cf539f8c2b95 (patch)
treee61730f36a86272f134ac6fe07a35ca2a773c912 /engines/mohawk/riven_card.cpp
parentce81c5345d7c8c017e70472dfe043b082cefee43 (diff)
downloadscummvm-rg350-ef42fd3476eb5da3a832d09b35e1cf539f8c2b95.tar.gz
scummvm-rg350-ef42fd3476eb5da3a832d09b35e1cf539f8c2b95.tar.bz2
scummvm-rg350-ef42fd3476eb5da3a832d09b35e1cf539f8c2b95.zip
MOHAWK: Riven: Implement transition offsets
The games tries to match objects between the old and new card by offsetting the transition of the new card. Fixes #9947.
Diffstat (limited to 'engines/mohawk/riven_card.cpp')
-rw-r--r--engines/mohawk/riven_card.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/mohawk/riven_card.cpp b/engines/mohawk/riven_card.cpp
index ed3f739cb7..f387bc450b 100644
--- a/engines/mohawk/riven_card.cpp
+++ b/engines/mohawk/riven_card.cpp
@@ -626,7 +626,7 @@ void RivenHotspot::loadFromStream(Common::ReadStream *stream) {
_u0 = stream->readUint16BE();
_mouseCursor = stream->readUint16BE();
_index = stream->readUint16BE();
- _u1 = stream->readSint16BE();
+ _transitionOffset = stream->readSint16BE();
_flags |= stream->readUint16BE();
// Read in the scripts now
@@ -693,6 +693,10 @@ int16 RivenHotspot::getNameId() const {
return _nameResource;
}
+int16 RivenHotspot::getTransitionOffset() const {
+ return _transitionOffset;
+}
+
void RivenHotspot::dump() const {
debug("index: %d", _index);
debug("blstId: %d", _blstID);
@@ -700,8 +704,8 @@ void RivenHotspot::dump() const {
debug("rect: (%d, %d, %d, %d)", _rect.left, _rect.top, _rect.right, _rect.bottom);
debug("flags: %d", _flags);
debug("mouseCursor: %d", _mouseCursor);
+ debug("transitionOffset: %d", _transitionOffset);
debug("u0: %d", _u0);
- debug("u1: %d", _u1);
debugN("\n");
for (uint i = 0; i < _scripts.size(); i++) {