diff options
author | Paul Gilbert | 2015-06-05 21:16:52 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-05 21:16:52 -0400 |
commit | 384dad67297188c5d171d0ceff8c5d401ea2ac42 (patch) | |
tree | 14c6a3f3c88c79d729c8c4d6140f68c7341d372d /engines/sherlock | |
parent | 9ada143d1450fcc61c6e3fbd505e1b04fe45140d (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/sherlock/objects.cpp | 18 | ||||
-rw-r--r-- | engines/sherlock/tattoo/tattoo_scene.cpp | 6 |
2 files changed, 21 insertions, 3 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; diff --git a/engines/sherlock/tattoo/tattoo_scene.cpp b/engines/sherlock/tattoo/tattoo_scene.cpp index 5f2e198f23..904d87c515 100644 --- a/engines/sherlock/tattoo/tattoo_scene.cpp +++ b/engines/sherlock/tattoo/tattoo_scene.cpp @@ -387,8 +387,6 @@ void TattooScene::doBgAnim() { doBgAnimCheckCursor(); - - screen.setDisplayBounds(Common::Rect(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCENE_HEIGHT)); talk._talkToAbort = false; // Check the characters and sprites for updates @@ -402,6 +400,10 @@ void TattooScene::doBgAnim() { _bgShapes[idx].checkObject(); } + // If one of the objects has signalled a call to a talk file, to go to another scene, exit immediately + if (_goToScene != -1) + return; + // Erase any affected background areas doBgAnimEraseBackground(); |