mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-12 03:56:20 +00:00
SHERLOCK: RT: Fix player animation when enterng scene
This commit is contained in:
parent
be5df8e304
commit
b26bc29619
@ -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 (IS_ROSE_TATTOO) {
|
||||
++_frameNumber;
|
||||
byte *p = &_sequences[_frameNumber];
|
||||
_seqTo = *p;
|
||||
*p = *(p - 2);
|
||||
|
||||
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;
|
||||
|
||||
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);
|
||||
|
||||
// Will be incremented below to return back to original value
|
||||
--_frameNumber;
|
||||
v = 0;
|
||||
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]),
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user