aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-05 22:27:54 -0400
committerPaul Gilbert2015-06-05 22:27:54 -0400
commit993b7af3559fa93b3f3bae44346f599a6527c512 (patch)
tree62fa9661c4e32e18c5eba004f3fad92b4ce72f76
parent97f7839f7190624c6d766b53162592c71d0fd2bc (diff)
downloadscummvm-rg350-993b7af3559fa93b3f3bae44346f599a6527c512.tar.gz
scummvm-rg350-993b7af3559fa93b3f3bae44346f599a6527c512.tar.bz2
scummvm-rg350-993b7af3559fa93b3f3bae44346f599a6527c512.zip
SHERLOCK: Fix movement in adjustObject
-rw-r--r--engines/sherlock/objects.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 0e8eb30511..1cfde29b9c 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -1272,10 +1272,8 @@ void Object::adjustObject() {
if (_type == REMOVE)
return;
- // Move the object's position
- _position += _delta;
-
if (IS_ROSE_TATTOO && (_delta.x || _delta.y)) {
+ // The shape position is in pixels, and the delta is in fixed integer amounts
int t;
_noShapeSize.x += _delta.x;
t = _noShapeSize.x / (FIXED_INT_MULTIPLIER / 10);
@@ -1286,6 +1284,9 @@ void Object::adjustObject() {
t = _noShapeSize.y / (FIXED_INT_MULTIPLIER / 10);
_noShapeSize.y -= t * (FIXED_INT_MULTIPLIER / 10);
_position.y += t;
+ } else if (IS_SERRATED_SCALPEL) {
+ // The delta is in whole pixels, so simply adjust the position with it
+ _position += _delta;
}
if (_position.y > LOWER_LIMIT)