diff options
author | Paul Gilbert | 2015-08-02 15:14:22 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-08-02 15:14:22 -0400 |
commit | 7765cdb9724db38c1046efc46b06326a451b00f2 (patch) | |
tree | 72f69a9899030ab81028beccab956bbcf5ae887f /engines/sherlock/tattoo/tattoo_talk.cpp | |
parent | 1e3313580f5e4fff2896c5a02214775c399a4c9b (diff) | |
download | scummvm-rg350-7765cdb9724db38c1046efc46b06326a451b00f2.tar.gz scummvm-rg350-7765cdb9724db38c1046efc46b06326a451b00f2.tar.bz2 scummvm-rg350-7765cdb9724db38c1046efc46b06326a451b00f2.zip |
SHERLOCK: RT: Implement Tattoo cmdCallTalkFile
Diffstat (limited to 'engines/sherlock/tattoo/tattoo_talk.cpp')
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index 8303fd42ad..260aee8857 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -877,6 +877,31 @@ OpcodeReturn TattooTalk::cmdWalkHomesAndNPCToCoords(const byte *&str) { return RET_SUCCESS; } +OpcodeReturn TattooTalk::cmdCallTalkFile(const byte *&str) { + TattooPeople &people = *(TattooPeople *)_vm->_people; + Common::String tempString; + + int npc = *++str; + assert(npc >= 1 && npc < MAX_CHARACTERS); + TattooPerson &person = people[npc]; + + if (person._resetNPCPath) { + person._npcIndex = person._npcPause = 0; + person._resetNPCPath = false; + Common::fill(&person._npcPath[0], &person._npcPath[100], 0); + } + + // Set the path control code and copy the filename + person._npcPath[person._npcIndex] = 4; + for (int idx = 1; idx <= 8; ++idx) + person._npcPath[person._npcIndex + idx] = str[idx]; + + person._npcIndex += 9; + str += 8; + + return RET_SUCCESS; +} + } // End of namespace Tattoo } // End of namespace Sherlock |