diff options
author | Paul Gilbert | 2015-04-20 01:07:54 -0500 |
---|---|---|
committer | Paul Gilbert | 2015-04-20 01:07:54 -0500 |
commit | bfb86a99db6358043a4c16371c5a927411b4e8cb (patch) | |
tree | b17ecdee21503b65641cc9be87c25f685d229390 /engines/sherlock/map.h | |
parent | 19142ef58a3e632b31a87a99b817e261f47c1bc4 (diff) | |
download | scummvm-rg350-bfb86a99db6358043a4c16371c5a927411b4e8cb.tar.gz scummvm-rg350-bfb86a99db6358043a4c16371c5a927411b4e8cb.tar.bz2 scummvm-rg350-bfb86a99db6358043a4c16371c5a927411b4e8cb.zip |
SHERLOCK: Map path walking, beginnings of darts game
Diffstat (limited to 'engines/sherlock/map.h')
-rw-r--r-- | engines/sherlock/map.h | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/engines/sherlock/map.h b/engines/sherlock/map.h index 653d8c0084..f324160bce 100644 --- a/engines/sherlock/map.h +++ b/engines/sherlock/map.h @@ -35,13 +35,21 @@ namespace Sherlock { class SherlockEngine; +struct MapEntry : Common::Point { + int _translate; + + MapEntry() : Common::Point(), _translate(-1) {} + + MapEntry(int x, int y, int translate) : Common::Point(x, y), _translate(translate) {} +}; + class Map { private: SherlockEngine *_vm; - Common::Array<Common::Point> _points; // Map locations for each scene + Common::Array<MapEntry> _points; // Map locations for each scene Common::StringArray _locationNames; Common::Array< Common::Array<int> > _paths; - Common::Array<int> _pathPoints; + Common::Array<Common::Point> _pathPoints; Common::Point _savedPos; Common::Point _savedSize; Surface _topLine; @@ -54,7 +62,7 @@ private: Common::Point _lDrawnPos; int _point; bool _placesShown; - int _charPoint; + int _charPoint, _oldCharPoint; int _cursorIndex; bool _drawMap; Surface _iconSave; @@ -67,6 +75,7 @@ private: void showPlaces(); void saveTopLine(); + void eraseTopLine(); void updateMap(bool flushScreen); @@ -77,9 +86,9 @@ private: public: Map(SherlockEngine *vm); - const Common::Point &operator[](int idx) { return _points[idx]; } + const MapEntry &operator[](int idx) { return _points[idx]; } - void loadPoints(int count, const int *xList, const int *yList); + void loadPoints(int count, const int *xList, const int *yList, const int *transList); int show(); }; |