diff options
author | Paul Gilbert | 2015-05-24 21:34:35 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-24 21:34:35 -0400 |
commit | 1f9f01c5714930e96eb7713c74fe826fe85d1457 (patch) | |
tree | c94b7c2b5f0440d744a5da6c500b2a938de9f804 /engines/sherlock/talk.cpp | |
parent | 5513f725102ad95b748810328a123d7a90ddd24a (diff) | |
download | scummvm-rg350-1f9f01c5714930e96eb7713c74fe826fe85d1457.tar.gz scummvm-rg350-1f9f01c5714930e96eb7713c74fe826fe85d1457.tar.bz2 scummvm-rg350-1f9f01c5714930e96eb7713c74fe826fe85d1457.zip |
SHERLOCK: Implement cmdNextSong
Diffstat (limited to 'engines/sherlock/talk.cpp')
-rw-r--r-- | engines/sherlock/talk.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp index 3e3fccee30..22e77fb869 100644 --- a/engines/sherlock/talk.cpp +++ b/engines/sherlock/talk.cpp @@ -2051,7 +2051,24 @@ TattooTalk::TattooTalk(SherlockEngine *vm) : Talk(vm) { } OpcodeReturn TattooTalk::cmdMouseOnOff(const byte *&str) { error("TODO: script opcode"); } -OpcodeReturn TattooTalk::cmdNextSong(const byte *&str) { error("TODO: script opcode"); } + +OpcodeReturn TattooTalk::cmdNextSong(const byte *&str) { + Sound &sound = *_vm->_sound; + + // Get the name of the next song to play + ++str; + sound._nextSongName = ""; + for (int idx = 0; idx < 8; ++idx) { + if (str[idx] != '~') + sound._nextSongName += str[idx]; + else + break; + } + str += 7; + + return RET_SUCCESS; +} + OpcodeReturn TattooTalk::cmdNPCLabelGoto(const byte *&str) { error("TODO: script opcode"); } OpcodeReturn TattooTalk::cmdNPCLabelIfFlagGoto(const byte *&str) { error("TODO: script opcode"); } OpcodeReturn TattooTalk::cmdNPCLabelSet(const byte *&str) { error("TODO: script opcode"); } |