From eb7fb219464505779ac2ca562291f92788b13c30 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 11 Jun 2015 23:26:58 -0400 Subject: SHERLOCK: Refactor setWalking into Person classes --- engines/sherlock/people.h | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'engines/sherlock/people.h') diff --git a/engines/sherlock/people.h b/engines/sherlock/people.h index 6d8389d9eb..2b99091671 100644 --- a/engines/sherlock/people.h +++ b/engines/sherlock/people.h @@ -59,6 +59,7 @@ struct PersonData { class Person : public Sprite { public: Common::Queue _walkTo; + int _srcZone, _destZone; bool _walkLoaded; Common::String _portrait; @@ -82,6 +83,13 @@ public: Person(); virtual ~Person() {} + /** + * Called to set the character walking to the current cursor location. + * It uses the zones and the inter-zone points to determine a series + * of steps to walk to get to that position. + */ + void goAllTheWay(); + /** * Clear the NPC related data */ @@ -99,8 +107,6 @@ class People { protected: SherlockEngine *_vm; Common::Array _data; - int _oldWalkSequence; - int _srcZone, _destZone; People(SherlockEngine *vm); public: @@ -109,7 +115,6 @@ public: Common::Point _walkDest; Point32 _hSavedPos; int _hSavedFacing; - Common::Queue _walkTo; bool _holmesOn; bool _portraitLoaded; bool _portraitsOn; @@ -146,25 +151,11 @@ public: */ bool freeWalk(); - /** - * Set the variables for moving a character from one poisition to another - * in a straight line - goAllTheWay must have been previously called to - * check for any obstacles in the path. - */ - void setWalking(); - /** * Walk to the co-ordinates passed, and then face the given direction */ void walkToCoords(const Point32 &destPos, int destDir); - /** - * Called to set the character walking to the current cursor location. - * It uses the zones and the inter-zone points to determine a series - * of steps to walk to get to that position. - */ - void goAllTheWay(); - /** * Finds the scene background object corresponding to a specified speaker */ -- cgit v1.2.3