From d3929bd4bc4dbd0f7f2b57000be757e6bc7706e8 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 14:50:09 +0200 Subject: HUGO: Some more renaming --- engines/hugo/route.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/hugo/route.h') diff --git a/engines/hugo/route.h b/engines/hugo/route.h index a95dd2151b..b20ac771d7 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -43,8 +43,8 @@ struct Point { }; struct segment_t { // Search segment - int16 y; // y position - int16 x1, x2; // Range of segment + int16 _y; // y position + int16 _x1, _x2; // Range of segment }; class Route { -- cgit v1.2.3 From 0c7fcff8a3fa10fc9bedcf0ac299809f9a140632 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 16:28:47 +0200 Subject: HUGO: Use Common::Point in pathfinding --- engines/hugo/route.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'engines/hugo/route.h') diff --git a/engines/hugo/route.h b/engines/hugo/route.h index b20ac771d7..53b0dd0f88 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -30,6 +30,8 @@ #ifndef HUGO_ROUTE_H #define HUGO_ROUTE_H +#include "common/rect.h" + namespace Hugo { /** @@ -37,11 +39,6 @@ namespace Hugo { */ enum go_t {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; -struct Point { - int x; - int y; -}; - struct segment_t { // Search segment int16 _y; // y position int16 _x1, _x2; // Range of segment @@ -75,7 +72,7 @@ private: 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) + 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 -- cgit v1.2.3 From 999ae29de43444118b5990a272a98031c4707ee0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Wed, 13 Jun 2012 20:58:01 +0200 Subject: HUGO: Rename structs and enums --- engines/hugo/route.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'engines/hugo/route.h') diff --git a/engines/hugo/route.h b/engines/hugo/route.h index 53b0dd0f88..716829a201 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -37,11 +37,11 @@ namespace Hugo { /** * Purpose of an automatic route */ -enum go_t {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; +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 { @@ -52,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); @@ -66,12 +66,12 @@ 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 + 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 -- cgit v1.2.3