From 5df022d75b94aff0c5e0c623669222a1d539b0cf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 12 Jun 2015 00:35:19 +0300 Subject: SHERLOCK: Implement the cmdRestorePeopleSequence opcode for Rose Tattoo --- engines/sherlock/tattoo/tattoo_talk.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index 4516dcd488..a46ab405f9 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -345,7 +345,23 @@ OpcodeReturn TattooTalk::cmdNPCLabelSet(const byte *&str) { OpcodeReturn TattooTalk::cmdPassword(const byte *&str) { error("TODO: script opcode"); } OpcodeReturn TattooTalk::cmdPlaySong(const byte *&str) { error("TODO: script opcode"); } -OpcodeReturn TattooTalk::cmdRestorePeopleSequence(const byte *&str) { error("TODO: script opcode"); } + +OpcodeReturn TattooTalk::cmdRestorePeopleSequence(const byte *&str) { + int npcNum = *++str - 1; + People &people = *_vm->_people; + Person &person = people[npcNum]; + person._misc = 0; + + if (person._seqTo) { + person._walkSequences[person._sequenceNumber]._sequences[person._frameNumber] = person._seqTo; + person._seqTo = 0; + } + person._sequenceNumber = person._savedNpcSequence; + person._frameNumber = person._savedNpcFrame; + person.checkWalkGraphics(); + + return RET_SUCCESS; +} OpcodeReturn TattooTalk::cmdSetNPCDescOnOff(const byte *&str) { int npcNum = *++str; -- cgit v1.2.3