diff options
author | Paul Gilbert | 2015-06-06 22:40:29 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-06 22:40:29 -0400 |
commit | 933e6751943fcb28fdb1b616f9834bd4f231f63d (patch) | |
tree | 4c4fc326b171ee60725af90c0afad08e779f04d3 /engines/sherlock/scalpel/scalpel_talk.cpp | |
parent | 3511f30a2621af4773df5271cdffb6275b9e829e (diff) | |
download | scummvm-rg350-933e6751943fcb28fdb1b616f9834bd4f231f63d.tar.gz scummvm-rg350-933e6751943fcb28fdb1b616f9834bd4f231f63d.tar.bz2 scummvm-rg350-933e6751943fcb28fdb1b616f9834bd4f231f63d.zip |
SHERLOCK: Setting up game specific People descendant classes
Diffstat (limited to 'engines/sherlock/scalpel/scalpel_talk.cpp')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index 65f7a76049..0d805c6177 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -21,6 +21,7 @@ */ #include "sherlock/scalpel/scalpel_talk.h" +#include "sherlock/scalpel/scalpel_people.h" #include "sherlock/scalpel/scalpel_user_interface.h" #include "sherlock/sherlock.h" #include "sherlock/screen.h" @@ -154,6 +155,28 @@ ScalpelTalk::ScalpelTalk(SherlockEngine *vm) : Talk(vm) { _opcodeTable = OPCODE_METHODS; } +OpcodeReturn ScalpelTalk::cmdSwitchSpeaker(const byte *&str) { + ScalpelPeople &people = *(ScalpelPeople *)_vm->_people; + UserInterface &ui = *_vm->_ui; + + if (!(_speaker & SPEAKER_REMOVE)) + people.clearTalking(); + if (_talkToAbort) + return RET_EXIT; + + ui.clearWindow(); + _yp = CONTROLS_Y + 12; + _charCount = _line = 0; + + _speaker = *++str - 1; + people.setTalking(_speaker); + pullSequence(); + pushSequence(_speaker); + setSequence(_speaker); + + return RET_SUCCESS; +} + OpcodeReturn ScalpelTalk::cmdAssignPortraitLocation(const byte *&str) { People &people = *_vm->_people; |