aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/objects.cpp11
-rw-r--r--engines/sherlock/objects.h2
2 files changed, 7 insertions, 6 deletions
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index d97d3122a0..ab14132a71 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -61,6 +61,7 @@ BaseObject::BaseObject() {
_images = nullptr;
_imageFrame = nullptr;
_sequenceNumber = 0;
+ _startSeq = 0;
_walkCount = 0;
_allow = 0;
_frameNumber = 0;
@@ -428,10 +429,9 @@ void BaseObject::setObjSequence(int seq, bool wait) {
if (_frameNumber >= checkFrame)
_frameNumber = 0;
- // For Rose Tattoo, save the starting frame for new sequences in the _sequenceNumber field,
- // to make it easier to reset back for repeats
+ // For Rose Tattoo, save the starting frame for new sequences
if (IS_ROSE_TATTOO)
- _sequenceNumber = _frameNumber;
+ _startSeq = _frameNumber;
_seqCounter = 0;
if (_sequences[_frameNumber] == 0)
@@ -441,9 +441,10 @@ void BaseObject::setObjSequence(int seq, bool wait) {
} else {
// Find beginning of sequence
if (IS_ROSE_TATTOO) {
- // Use the sequence number as the index to reset the sequence back to
- _frameNumber = _sequenceNumber;
+ // Use the saved start of the sequence to reset the frame
+ _frameNumber = _startSeq;
} else {
+ // For Scalpel, scan backwards from the end of the sequence to find it's start
do {
--_frameNumber;
} while (_frameNumber > 0 && _sequences[_frameNumber] != 0);
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index 337d320912..38b02aeae8 100644
--- a/engines/sherlock/objects.h
+++ b/engines/sherlock/objects.h
@@ -209,6 +209,7 @@ public:
ImageFile *_images; // Sprite images
ImageFrame *_imageFrame; // Pointer to shape in the images
int _sequenceNumber; // Sequence being used
+ int _startSeq; // Frame sequence starts at
int _walkCount; // Walk counter
int _allow; // Allowed UI commands
int _frameNumber; // Frame number in rame sequence to draw
@@ -289,7 +290,6 @@ public:
int8 _misc; // Miscellaneous use
// Rose Tattoo fields
- int _startSeq; // Frame sequence starts at
ImageFrame *_stopFrames[8]; // Stop/rest frame for each direction
ImageFile *_altImages; // Images used for alternate NPC sequences
int _altSeq; // Which of the sequences the alt graphics apply to (0: main, 1=NPC seq)