aboutsummaryrefslogtreecommitdiff
path: root/engines/sherlock/people.h
diff options
context:
space:
mode:
authorPaul Gilbert2015-08-15 20:26:36 -0400
committerPaul Gilbert2015-08-15 20:26:36 -0400
commit621a37bbe30756a7983c1e5463389539898d41a5 (patch)
treed5f1fa95dd03590865d875a91a64f3a776987bad /engines/sherlock/people.h
parent11e327c4e7d41e01378cbdbaf339bbd09881f326 (diff)
downloadscummvm-rg350-621a37bbe30756a7983c1e5463389539898d41a5.tar.gz
scummvm-rg350-621a37bbe30756a7983c1e5463389539898d41a5.tar.bz2
scummvm-rg350-621a37bbe30756a7983c1e5463389539898d41a5.zip
SHERLOCK: Fix saving/loading when characters are moving
Diffstat (limited to 'engines/sherlock/people.h')
-rw-r--r--engines/sherlock/people.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/engines/sherlock/people.h b/engines/sherlock/people.h
index d790e4ccb0..b97dc715cc 100644
--- a/engines/sherlock/people.h
+++ b/engines/sherlock/people.h
@@ -56,6 +56,21 @@ struct PersonData {
_name(name), _portrait(portrait), _stillSequences(stillSequences), _talkSequences(talkSequences) {}
};
+class PointQueue {
+private:
+ Common::List<Common::Point> _impl;
+public:
+ PointQueue() : _impl() {}
+
+ bool empty() const { return _impl.empty(); }
+ void clear() { _impl.clear(); }
+ Common::Point &front() { return _impl.front(); }
+ const Common::Point &front() const { return _impl.front(); }
+ void push(const Common::Point &pt);
+ Common::Point pop();
+ void synchronize(Common::Serializer &s);
+};
+
class Person : public Sprite {
protected:
/**
@@ -63,7 +78,7 @@ protected:
*/
virtual Common::Point getSourcePoint() const = 0;
public:
- Common::Queue<Common::Point> _walkTo;
+ PointQueue _walkTo;
int _srcZone, _destZone;
bool _walkLoaded;
Common::String _portrait;