From bfb86a99db6358043a4c16371c5a927411b4e8cb Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Mon, 20 Apr 2015 01:07:54 -0500 Subject: SHERLOCK: Map path walking, beginnings of darts game --- engines/sherlock/map.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'engines/sherlock/map.h') 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 _points; // Map locations for each scene + Common::Array _points; // Map locations for each scene Common::StringArray _locationNames; Common::Array< Common::Array > _paths; - Common::Array _pathPoints; + Common::Array _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(); }; -- cgit v1.2.3