aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/objects.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-05 21:16:52 -0400
committerPaul Gilbert2015-06-05 21:16:52 -0400
commit384dad67297188c5d171d0ceff8c5d401ea2ac42 (patch)
tree14c6a3f3c88c79d729c8c4d6140f68c7341d372d /engines/sherlock/objects.cpp
parent9ada143d1450fcc61c6e3fbd505e1b04fe45140d (diff)
downloadscummvm-rg350-384dad67297188c5d171d0ceff8c5d401ea2ac42.tar.gz
scummvm-rg350-384dad67297188c5d171d0ceff8c5d401ea2ac42.tar.bz2
scummvm-rg350-384dad67297188c5d171d0ceff8c5d401ea2ac42.zip
SHERLOCK: Fixes for RT object sequence handling
Diffstat (limited to 'engines/sherlock/objects.cpp')
-rw-r--r--engines/sherlock/objects.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 625371267f..daef54e4c0 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -31,7 +31,7 @@ namespace Sherlock {
#define START_FRAME 0
#define UPPER_LIMIT 0
-#define LOWER_LIMIT CONTROLS_Y
+#define LOWER_LIMIT (IS_SERRATED_SCALPEL ? CONTROLS_Y : SHERLOCK_SCREEN_HEIGHT)
#define LEFT_LIMIT 0
#define RIGHT_LIMIT SHERLOCK_SCREEN_WIDTH
#define NUM_ADJUSTED_WALKS 21
@@ -960,6 +960,8 @@ bool Object::checkEndOfSequence() {
screen._backBuffer1.transBlitFrom(*_imageFrame, _position);
screen._backBuffer2.transBlitFrom(*_imageFrame, _position);
_type = INVALID;
+ } else if (IS_ROSE_TATTOO && _talkSeq && seq == 0) {
+ setObjTalkSequence(_talkSeq);
} else {
setObjSequence(seq, false);
}
@@ -1270,8 +1272,22 @@ void Object::adjustObject() {
if (_type == REMOVE)
return;
+ // Move the object's position
_position += _delta;
+ if (IS_ROSE_TATTOO && (_delta.x || _delta.y)) {
+ int t;
+ _noShapeSize.x += _delta.x;
+ t = _noShapeSize.x / (FIXED_INT_MULTIPLIER / 10);
+ _noShapeSize.x -= t * (FIXED_INT_MULTIPLIER / 10);
+ _position.x += t;
+
+ _noShapeSize.y += _delta.y;
+ t = _noShapeSize.y / (FIXED_INT_MULTIPLIER / 10);
+ _noShapeSize.y -= t * (FIXED_INT_MULTIPLIER / 10);
+ _position.y += t;
+ }
+
if (_position.y > LOWER_LIMIT)
_position.y = LOWER_LIMIT;