diff options
author | Filippos Karapetis | 2015-06-12 00:35:19 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-06-12 00:35:42 +0300 |
commit | 5df022d75b94aff0c5e0c623669222a1d539b0cf (patch) | |
tree | 199d64be78c6a84e53d2332e8de1065d51e6d499 | |
parent | 92ba3d1a29fbbb4506cbaffd023e76a560f0e43d (diff) | |
download | scummvm-rg350-5df022d75b94aff0c5e0c623669222a1d539b0cf.tar.gz scummvm-rg350-5df022d75b94aff0c5e0c623669222a1d539b0cf.tar.bz2 scummvm-rg350-5df022d75b94aff0c5e0c623669222a1d539b0cf.zip |
SHERLOCK: Implement the cmdRestorePeopleSequence opcode for Rose Tattoo
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
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; |