aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/talk.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2015-06-06 22:40:29 -0400
committerPaul Gilbert2015-06-06 22:40:29 -0400
commit933e6751943fcb28fdb1b616f9834bd4f231f63d (patch)
tree4c4fc326b171ee60725af90c0afad08e779f04d3 /engines/sherlock/talk.cpp
parent3511f30a2621af4773df5271cdffb6275b9e829e (diff)
downloadscummvm-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/talk.cpp')
-rw-r--r--engines/sherlock/talk.cpp43
1 files changed, 14 insertions, 29 deletions
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index 9d67e024b3..0f85cb098e 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -23,6 +23,7 @@
#include "sherlock/talk.h"
#include "sherlock/sherlock.h"
#include "sherlock/screen.h"
+#include "sherlock/scalpel/scalpel_people.h"
#include "sherlock/scalpel/scalpel_talk.h"
#include "sherlock/scalpel/scalpel_user_interface.h"
#include "sherlock/tattoo/tattoo_talk.h"
@@ -949,7 +950,6 @@ void Talk::doScript(const Common::String &script) {
_scriptStart = (const byte *)script.c_str();
_scriptEnd = _scriptStart + script.size();
const byte *str = _scriptStart;
- _yp = CONTROLS_Y + 12;
_charCount = 0;
_line = 0;
_wait = 0;
@@ -958,6 +958,11 @@ void Talk::doScript(const Common::String &script) {
_noTextYet = true;
_endStr = false;
+ if (IS_SERRATED_SCALPEL)
+ _yp = CONTROLS_Y + 12;
+ else
+ _yp = (_talkTo == -1) ? 5 : screen.fontHeight() + 11;
+
if (IS_ROSE_TATTOO) {
for (uint idx = 0; idx < MAX_CHARACTERS; ++idx) {
Person &p = people[idx];
@@ -1015,12 +1020,14 @@ void Talk::doScript(const Common::String &script) {
str += 2;
}
- // Remove portrait?
- if (str[0] == _opcodes[OP_REMOVE_PORTRAIT]) {
- _speaker = -1;
- } else {
- // Nope, so set the first speaker
- people.setTalking(_speaker);
+ if (IS_SERRATED_SCALPEL) {
+ // Remove portrait?
+ if ( str[0] == _opcodes[OP_REMOVE_PORTRAIT]) {
+ _speaker = -1;
+ } else {
+ // Nope, so set the first speaker
+ ((Scalpel::ScalpelPeople *)_vm->_people)->setTalking(_speaker);
+ }
}
}
}
@@ -1567,28 +1574,6 @@ OpcodeReturn Talk::cmdStealthModeDeactivate(const byte *&str) {
return RET_SUCCESS;
}
-OpcodeReturn Talk::cmdSwitchSpeaker(const byte *&str) {
- People &people = *_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 Talk::cmdToggleObject(const byte *&str) {
Scene &scene = *_vm->_scene;
Common::String tempString;