diff options
author | Paul Gilbert | 2015-06-30 21:18:26 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-30 21:18:26 -0400 |
commit | d2c4074fa65106e5e26f66cf9ce79fe6f5214da6 (patch) | |
tree | f07c53cc9f4fac19ffbb38dd9f405ca26a3c64ef /engines | |
parent | e2803d77c6a693852b8c665bdedee5633ad5eec1 (diff) | |
download | scummvm-rg350-d2c4074fa65106e5e26f66cf9ce79fe6f5214da6.tar.gz scummvm-rg350-d2c4074fa65106e5e26f66cf9ce79fe6f5214da6.tar.bz2 scummvm-rg350-d2c4074fa65106e5e26f66cf9ce79fe6f5214da6.zip |
SHERLOCK: RT: Fix incorrectly playing sounds when looking at objects
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sherlock/objects.cpp | 9 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_user_interface.cpp | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp index 97d63c5da6..0a4b7e92a9 100644 --- a/engines/sherlock/objects.cpp +++ b/engines/sherlock/objects.cpp @@ -979,8 +979,13 @@ void Object::load(Common::SeekableReadStream &s, bool isRoseTattoo) { _aType = (AType)s.readByte(); _lookFrames = s.readByte(); _seqCounter = s.readByte(); - _lookPosition.x = s.readUint16LE() * FIXED_INT_MULTIPLIER / 100; - _lookPosition.y = (isRoseTattoo ? s.readSint16LE() : s.readByte()) * FIXED_INT_MULTIPLIER; + if (isRoseTattoo) { + _lookPosition.x = s.readUint16LE() * FIXED_INT_MULTIPLIER; + _lookPosition.y = s.readSint16LE() * FIXED_INT_MULTIPLIER; + } else { + _lookPosition.x = s.readUint16LE() * FIXED_INT_MULTIPLIER / 100; + _lookPosition.y = s.readByte() * FIXED_INT_MULTIPLIER; + } _lookFacing = s.readByte(); _lookcAnim = s.readByte(); diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp index 79a6eaf240..7de78457c6 100644 --- a/engines/sherlock/tattoo/tattoo_user_interface.cpp +++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp @@ -108,7 +108,7 @@ void TattooUserInterface::lookAtObject() { name.deleteLastChar(); // See if this Object Sound List entry matches the object's name - if (_bgShape->_name.compareToIgnoreCase(name)) { + if (!_bgShape->_name.compareToIgnoreCase(name)) { // Move forward to get the sound filename while ((*p == ' ') || (*p == '=')) ++p; |