diff options
Diffstat (limited to 'engines/hugo/route.h')
-rw-r--r-- | engines/hugo/route.h | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/engines/hugo/route.h b/engines/hugo/route.h index a95dd2151b..716829a201 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -30,21 +30,18 @@ #ifndef HUGO_ROUTE_H #define HUGO_ROUTE_H +#include "common/rect.h" + namespace Hugo { /** * Purpose of an automatic route */ -enum go_t {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; - -struct Point { - int x; - int y; -}; +enum RouteType {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; -struct segment_t { // Search segment - int16 y; // y position - int16 x1, x2; // Range of segment +struct Segment { // Search segment + int16 _y; // y position + int16 _x1, _x2; // Range of segment }; class Route { @@ -55,7 +52,7 @@ public: int16 getRouteIndex() const; void processRoute(); - bool startRoute(const go_t routeType, const int16 objId, int16 cx, int16 cy); + bool startRoute(const RouteType routeType, const int16 objId, int16 cx, int16 cy); void setDirection(const uint16 keyCode); void setWalk(const uint16 direction); @@ -69,13 +66,13 @@ private: uint16 _oldWalkDirection; // Last direction char - int16 _routeIndex; // Index into route list, or -1 - go_t _routeType; // Purpose of an automatic route - int16 _routeObjId; // Index of exit of object walking to + int16 _routeIndex; // Index into route list, or -1 + RouteType _routeType; // Purpose of an automatic route + int16 _routeObjId; // Index of exit of object walking to byte _boundaryMap[kYPix][kXPix]; // Boundary byte map - segment_t _segment[kMaxSeg]; // List of points in fill-path - Point _route[kMaxNodes]; // List of nodes in route (global) + Segment _segment[kMaxSeg]; // List of points in fill-path + Common::Point _route[kMaxNodes]; // List of nodes in route (global) int16 _segmentNumb; // Count number of segments int16 _routeListIndex; // Index into route list int16 _destX; @@ -87,7 +84,7 @@ private: void segment(int16 x, int16 y); bool findRoute(const int16 cx, const int16 cy); - Point *newNode(); + Common::Point *newNode(); }; } // End of namespace Hugo |