From 9c66934608cd6f756c170bcb050ee4d6452f0a36 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 12 Jun 2015 22:03:15 +0300 Subject: SHERLOCK: RT: Initial implementation of cmdWalkHolmesToCoords --- engines/sherlock/scalpel/scalpel_talk.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'engines/sherlock/scalpel/scalpel_talk.cpp') diff --git a/engines/sherlock/scalpel/scalpel_talk.cpp b/engines/sherlock/scalpel/scalpel_talk.cpp index 3dc99c236b..17b251fe47 100644 --- a/engines/sherlock/scalpel/scalpel_talk.cpp +++ b/engines/sherlock/scalpel/scalpel_talk.cpp @@ -452,6 +452,19 @@ OpcodeReturn ScalpelTalk::cmdRemovePortrait(const byte *&str) { return RET_SUCCESS; } +OpcodeReturn ScalpelTalk::cmdWalkToCoords(const byte *&str) { + People &people = *_vm->_people; + ++str; + + people.walkToCoords(Point32(((str[0] - 1) * 256 + str[1] - 1) * FIXED_INT_MULTIPLIER, + str[2] * FIXED_INT_MULTIPLIER), str[3] - 1); + if (_talkToAbort) + return RET_EXIT; + + str += 3; + return RET_SUCCESS; +} + OpcodeReturn ScalpelTalk::cmdSfxCommand(const byte *&str) { Sound &sound = *_vm->_sound; Common::String tempString; -- cgit v1.2.3