diff options
author | Paul Gilbert | 2015-08-17 07:46:28 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-08-17 07:46:28 -0400 |
commit | fe362f3fbc0a4df5ba83737f4ba4c1f04943aad1 (patch) | |
tree | 332fe7c2eea2f293e87b9f6d35cd151de7cb98a1 /engines/sherlock/talk.cpp | |
parent | c14f27aa48f89ec1a903effe87d03029c90060c1 (diff) | |
download | scummvm-rg350-fe362f3fbc0a4df5ba83737f4ba4c1f04943aad1.tar.gz scummvm-rg350-fe362f3fbc0a4df5ba83737f4ba4c1f04943aad1.tar.bz2 scummvm-rg350-fe362f3fbc0a4df5ba83737f4ba4c1f04943aad1.zip |
SHERLOCK: RT: Merge setStillSequence & setListenSequence methods
Diffstat (limited to 'engines/sherlock/talk.cpp')
-rw-r--r-- | engines/sherlock/talk.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 5213445cc7..a2d6d8a353 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -500,7 +500,7 @@ void Talk::talk(int objNum) { Object &obj = scene._bgShapes[objNum]; clearSequences(); pushSequence(_talkTo); - setStillSeq(_talkTo); + people.setListenSequence(_talkTo, 129); events.setCursor(WAIT); if (obj._lookPosition.y != 0) @@ -521,7 +521,7 @@ void Talk::talk(int objNum) { Object &obj = scene._bgShapes[objNum]; clearSequences(); pushSequence(_talkTo); - setStillSeq(_talkTo); + people.setListenSequence(_talkTo, 129); events.setCursor(WAIT); if (obj._lookPosition.y != 0) @@ -694,36 +694,6 @@ void Talk::pushTalkSequence(Object *obj) { error("Ran out of talk sequence stack space"); } -void Talk::setStillSeq(int speaker) { - People &people = *_vm->_people; - Scene &scene = *_vm->_scene; - - // Don't bother doing anything if no specific speaker is specified - if (speaker == -1) - return; - - if (speaker) { - int objNum = people.findSpeaker(speaker); - if (objNum != -1) { - Object &obj = scene._bgShapes[objNum]; - - if (obj._seqSize < MAX_TALK_SEQUENCES) { - warning("Tried to copy too few still frames"); - } else { - for (uint idx = 0; idx < MAX_TALK_SEQUENCES; ++idx) { - obj._sequences[idx] = people._characters[speaker]._stillSequences[idx]; - if (idx > 0 && !people._characters[speaker]._talkSequences[idx] && - !people._characters[speaker]._talkSequences[idx - 1]) - break; - } - - obj._frameNumber = 0; - obj._seqTo = 0; - } - } - } -} - void Talk::doScript(const Common::String &script) { People &people = *_vm->_people; Scene &scene = *_vm->_scene; |