diff options
author | Filippos Karapetis | 2015-06-11 23:31:06 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-06-11 23:31:28 +0300 |
commit | ed52070aa502efd4f5999c1857570f5605f0bf2b (patch) | |
tree | 17fa215f3b094a3ea7783dfc6325910fa9f616ae | |
parent | f857864410b14ed175cf96871146c2072401ce47 (diff) | |
download | scummvm-rg350-ed52070aa502efd4f5999c1857570f5605f0bf2b.tar.gz scummvm-rg350-ed52070aa502efd4f5999c1857570f5605f0bf2b.tar.bz2 scummvm-rg350-ed52070aa502efd4f5999c1857570f5605f0bf2b.zip |
SHERLOCK: Implement the cmdSetNPCDescOnOff opcode for Rose Tattoo
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index b84cebe185..148a10ae0a 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -293,7 +293,27 @@ OpcodeReturn TattooTalk::cmdNPCLabelSet(const byte *&str) { error("TODO: script 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::cmdSetNPCDescOnOff(const byte *&str) { error("TODO: script opcode"); } + +OpcodeReturn TattooTalk::cmdSetNPCDescOnOff(const byte *&str) { + int npcNum = *++str; + ++str; + People &people = *_vm->_people; + Person &person = people[npcNum]; + + // Copy over the NPC examine text until we reach a stop marker, which is + // the same as a start marker, or we reach the end of the file + while (*str && *str != 208) + person._examine += *str++; + + // Move past any leftover text till we reach a stop marker + while (*str && *str != 208) + str++; + + if (!*str) + str--; + + return RET_SUCCESS; +} OpcodeReturn TattooTalk::cmdSetNPCInfoLine(const byte *&str) { int npcNum = *++str; |