diff options
author | Filippos Karapetis | 2015-06-12 22:03:15 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-06-12 22:03:15 +0300 |
commit | 9c66934608cd6f756c170bcb050ee4d6452f0a36 (patch) | |
tree | 9cd52206ee9e1a016593e9df2fec968915b84bb9 /engines/sherlock/scalpel | |
parent | 91558e5f25a2ede20906a6550182dc30b8078567 (diff) | |
download | scummvm-rg350-9c66934608cd6f756c170bcb050ee4d6452f0a36.tar.gz scummvm-rg350-9c66934608cd6f756c170bcb050ee4d6452f0a36.tar.bz2 scummvm-rg350-9c66934608cd6f756c170bcb050ee4d6452f0a36.zip |
SHERLOCK: RT: Initial implementation of cmdWalkHolmesToCoords
Diffstat (limited to 'engines/sherlock/scalpel')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.cpp | 13 | ||||
-rw-r--r-- | engines/sherlock/scalpel/scalpel_talk.h | 1 |
2 files changed, 14 insertions, 0 deletions
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; diff --git a/engines/sherlock/scalpel/scalpel_talk.h b/engines/sherlock/scalpel/scalpel_talk.h index a3ac0f2845..5794813457 100644 --- a/engines/sherlock/scalpel/scalpel_talk.h +++ b/engines/sherlock/scalpel/scalpel_talk.h @@ -51,6 +51,7 @@ private: OpcodeReturn cmdSfxCommand(const byte *&str); OpcodeReturn cmdSummonWindow(const byte *&str); OpcodeReturn cmdCarriageReturn(const byte *&str); + OpcodeReturn cmdWalkToCoords(const byte *&str); protected: /** * Display the talk interface window |