diff options
author | Paul Gilbert | 2015-07-05 12:11:44 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-07-05 12:11:44 -0400 |
commit | dcd33889d41a33d591fa7499c67e646951b0627d (patch) | |
tree | d99148397aa8dde45a62123f1146ae2fd813e10c | |
parent | 00a9e22bab16a4c6075a1d7ecd64bfdb96b63779 (diff) | |
download | scummvm-rg350-dcd33889d41a33d591fa7499c67e646951b0627d.tar.gz scummvm-rg350-dcd33889d41a33d591fa7499c67e646951b0627d.tar.bz2 scummvm-rg350-dcd33889d41a33d591fa7499c67e646951b0627d.zip |
SHERLOCK: RT: Cleanup of cmdWalkHolmesToCoords
-rw-r--r-- | engines/sherlock/tattoo/tattoo_talk.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp index e61873ced9..d0c4bdc3b0 100644 --- a/engines/sherlock/tattoo/tattoo_talk.cpp +++ b/engines/sherlock/tattoo/tattoo_talk.cpp @@ -239,15 +239,15 @@ OpcodeReturn TattooTalk::cmdWalkHolmesToCoords(const byte *&str) { People &people = *_vm->_people; ++str; - int x = (str[0] - 1) * 256 + str[1] - 1; - if (x > 16384) - x = -1 * (x - 16384); - warning("TODO: cmdWalkHolmesToCoords - call RT walkToCoords variant"); - people[HOLMES].walkToCoords( - Point32(x * FIXED_INT_MULTIPLIER, ((str[2] - 1) * 256 + str[3] - 1) * FIXED_INT_MULTIPLIER), - DIRECTION_CONVERSION[str[4] - 1] - //HOLMES - ); + int xp = (str[0] - 1) * 256 + str[1] - 1; + if (xp > 16384) + // Negative X + xp = -1 * (xp - 16384); + int yp = (str[2] - 1) * 256 + str[3] - 1; + + people[HOLMES].walkToCoords(Point32(xp * FIXED_INT_MULTIPLIER, yp * FIXED_INT_MULTIPLIER), + DIRECTION_CONVERSION[str[4] - 1]); + if (_talkToAbort) return RET_EXIT; |