SHERLOCK: RT: Save sequence starts in _startSeq, not _sequenceNumber

This commit is contained in:
Paul Gilbert 2015-08-15 11:27:35 -04:00
parent df80a92e0a
commit 00918f1aaa
2 changed files with 7 additions and 6 deletions

View File

@ -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);

View File

@ -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)