[Scummvm-cvs-logs] scummvm master -> dcd33889d41a33d591fa7499c67e646951b0627d
dreammaster
dreammaster at scummvm.org
Sun Jul 5 18:12:45 CEST 2015
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
dcd33889d4 SHERLOCK: RT: Cleanup of cmdWalkHolmesToCoords
Commit: dcd33889d41a33d591fa7499c67e646951b0627d
https://github.com/scummvm/scummvm/commit/dcd33889d41a33d591fa7499c67e646951b0627d
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2015-07-05T12:11:44-04:00
Commit Message:
SHERLOCK: RT: Cleanup of cmdWalkHolmesToCoords
Changed paths:
engines/sherlock/tattoo/tattoo_talk.cpp
diff --git a/engines/sherlock/tattoo/tattoo_talk.cpp b/engines/sherlock/tattoo/tattoo_talk.cpp
index e61873c..d0c4bdc 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;
More information about the Scummvm-git-logs
mailing list