aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-14 10:57:05 -0400
committerPaul Gilbert2015-06-14 10:57:05 -0400
commitb26bc296194c3a745fa9d222862ce1ad12a13e3e (patch)
tree6d90bfc1a0084d42d1f97eacd6e8344d173d16c0 /engines/sherlock
parentbe5df8e30455b45e20dff36c899ce18184544ed1 (diff)
downloadscummvm-rg350-b26bc296194c3a745fa9d222862ce1ad12a13e3e.tar.gz
scummvm-rg350-b26bc296194c3a745fa9d222862ce1ad12a13e3e.tar.bz2
scummvm-rg350-b26bc296194c3a745fa9d222862ce1ad12a13e3e.zip
SHERLOCK: RT: Fix player animation when enterng scene
Diffstat (limited to 'engines/sherlock')
-rw-r--r--engines/sherlock/objects.cpp51
-rw-r--r--engines/sherlock/people.cpp2
-rw-r--r--engines/sherlock/talk.cpp6
-rw-r--r--engines/sherlock/tattoo/tattoo_people.cpp2
-rw-r--r--engines/sherlock/tattoo/tattoo_user_interface.cpp6
5 files changed, 36 insertions, 31 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 270ddc8ec4..0d330370e7 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -290,26 +290,39 @@ void BaseObject::checkObject() {
} else {
v -= 128;
- // 68-99 is a squence code
+ // 68-99 is a sequence code
if (v > SEQ_TO_CODE) {
- byte *p = &_sequences[_frameNumber];
- v -= SEQ_TO_CODE; // # from 1-32
- _seqTo = v;
- *p = *(p - 1);
-
- if (*p > 128)
- // If the high bit is set, convert to a real frame
- *p -= (byte)(SEQ_TO_CODE - 128);
-
- if (*p > _seqTo)
- *p -= 1;
- else
- *p += 1;
-
- // Will be incremented below to return back to original value
- --_frameNumber;
- v = 0;
-
+ if (IS_ROSE_TATTOO) {
+ ++_frameNumber;
+ byte *p = &_sequences[_frameNumber];
+ _seqTo = *p;
+ *p = *(p - 2);
+
+ if (*p > _seqTo)
+ *p -= 1;
+ else
+ *p += 1;
+
+ --_frameNumber;
+ } else {
+ byte *p = &_sequences[_frameNumber];
+ v -= SEQ_TO_CODE; // # from 1-32
+ _seqTo = v;
+ *p = *(p - 1);
+
+ if (*p > 128)
+ // If the high bit is set, convert to a real frame
+ *p -= (byte)(SEQ_TO_CODE - 128);
+
+ if (*p > _seqTo)
+ *p -= 1;
+ else
+ *p += 1;
+
+ // Will be incremented below to return back to original value
+ --_frameNumber;
+ v = 0;
+ }
} else if (IS_ROSE_TATTOO && v == 10) {
// Set delta for objects
_delta = Common::Point(READ_LE_UINT16(&_sequences[_frameNumber + 1]),
diff --git a/engines/sherlock/people.cpp b/engines/sherlock/people.cpp
index 7cdaab7626..0db687c556 100644
--- a/engines/sherlock/people.cpp
+++ b/engines/sherlock/people.cpp
@@ -197,7 +197,7 @@ People *People::init(SherlockEngine *vm) {
People::People(SherlockEngine *vm) : _vm(vm) {
_holmesOn = true;
- _allowWalkAbort = false;
+ _allowWalkAbort = true;
_portraitLoaded = false;
_portraitsOn = true;
_clearingThePortrait = false;
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index c800881da8..a349d7193d 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -170,9 +170,9 @@ void Talk::talkTo(const Common::String &filename) {
// Turn on the Exit option
ui._endKeyActive = true;
- if (people[HOLMES]._walkCount || people[HOLMES]._walkTo.size() > 0) {
- // Only interrupt if an action if trying to do an action, and not just
- // if the player is walking around the scene
+ if (people[HOLMES]._walkCount || (people[HOLMES]._walkTo.size() > 0 &&
+ (IS_SERRATED_SCALPEL || people._allowWalkAbort))) {
+ // Only interrupt if trying to do an action, and not just if player is walking around the scene
if (people._allowWalkAbort)
abortFlag = true;
diff --git a/engines/sherlock/tattoo/tattoo_people.cpp b/engines/sherlock/tattoo/tattoo_people.cpp
index 2bdf1164ab..a8c906a41a 100644
--- a/engines/sherlock/tattoo/tattoo_people.cpp
+++ b/engines/sherlock/tattoo/tattoo_people.cpp
@@ -461,8 +461,6 @@ TattooPeople::TattooPeople(SherlockEngine *vm) : People(vm) {
_data.push_back(new TattooPerson());
}
-
-
void TattooPeople::setListenSequence(int speaker, int sequenceNum) {
Scene &scene = *_vm->_scene;
diff --git a/engines/sherlock/tattoo/tattoo_user_interface.cpp b/engines/sherlock/tattoo/tattoo_user_interface.cpp
index e6a6430a3e..915acde400 100644
--- a/engines/sherlock/tattoo/tattoo_user_interface.cpp
+++ b/engines/sherlock/tattoo/tattoo_user_interface.cpp
@@ -403,12 +403,6 @@ void TattooUserInterface::doStandardControl() {
}
}
}
- static bool flag = false;
- if (!flag) {
- flag = true;
- people._walkDest = Common::Point(235, 370);
- people[HOLMES].goAllTheWay();
- }
}
void TattooUserInterface::doLookControl() {