diff options
author | Paul Gilbert | 2015-06-11 23:26:58 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-06-11 23:26:58 -0400 |
commit | eb7fb219464505779ac2ca562291f92788b13c30 (patch) | |
tree | 49111394528682f856a8f4cb9037156238055adf /engines/sherlock/scalpel/scalpel_map.cpp | |
parent | a97715f9dcca2022a8f502ded4e4843f076b4687 (diff) | |
download | scummvm-rg350-eb7fb219464505779ac2ca562291f92788b13c30.tar.gz scummvm-rg350-eb7fb219464505779ac2ca562291f92788b13c30.tar.bz2 scummvm-rg350-eb7fb219464505779ac2ca562291f92788b13c30.zip |
SHERLOCK: Refactor setWalking into Person classes
Diffstat (limited to 'engines/sherlock/scalpel/scalpel_map.cpp')
-rw-r--r-- | engines/sherlock/scalpel/scalpel_map.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/sherlock/scalpel/scalpel_map.cpp b/engines/sherlock/scalpel/scalpel_map.cpp index 3957f27457..a9e566f73c 100644 --- a/engines/sherlock/scalpel/scalpel_map.cpp +++ b/engines/sherlock/scalpel/scalpel_map.cpp @@ -428,7 +428,7 @@ void ScalpelMap::walkTheStreets() { const byte *path = _paths.getPath(start, dest); // Add in destination position - people._walkTo.clear(); + people[PLAYER]._walkTo.clear(); Common::Point destPos = people._walkDest; // Check for any intermediate points between the two locations @@ -436,7 +436,7 @@ void ScalpelMap::walkTheStreets() { people[PLAYER]._sequenceNumber = -1; if (_charPoint == 51 || _oldCharPoint == 51) { - people.setWalking(); + people[PLAYER].setWalking(); } else { bool reversePath = false; @@ -453,25 +453,25 @@ void ScalpelMap::walkTheStreets() { } while (*path != 254); // Load up the path to use - people._walkTo.clear(); + people[PLAYER]._walkTo.clear(); if (reversePath) { for (int idx = (int)tempPath.size() - 1; idx >= 0; --idx) - people._walkTo.push(tempPath[idx]); + people[PLAYER]._walkTo.push(tempPath[idx]); } else { for (int idx = 0; idx < (int)tempPath.size(); ++idx) - people._walkTo.push(tempPath[idx]); + people[PLAYER]._walkTo.push(tempPath[idx]); } - people._walkDest = people._walkTo.pop() + Common::Point(12, 6); - people.setWalking(); + people._walkDest = people[PLAYER]._walkTo.pop() + Common::Point(12, 6); + people[PLAYER].setWalking(); } } else { people[PLAYER]._walkCount = 0; } // Store the final destination icon position - people._walkTo.push(destPos); + people[PLAYER]._walkTo.push(destPos); } void ScalpelMap::saveIcon(ImageFrame *src, const Common::Point &pt) { |