22 #ifndef HOPKINS_LINES_H 23 #define HOPKINS_LINES_H 25 #include "hopkins/globals.h" 27 #include "common/scummsys.h" 28 #include "common/str.h" 40 #define INVALID_LINE_VALUE 1300 48 Directions _direction;
49 Directions _directionRouteInc;
50 Directions _directionRouteDec;
53 int appendToRouteInc(
int from,
int to,
RouteItem *route,
int index);
54 int appendToRouteDec(
int from,
int to,
RouteItem *route,
int index);
100 bool isValid()
const {
return _x != -1 || _y != -1; }
101 void invalidate() { _x = _y = -1; _dir = DIR_NONE; }
102 void set(int16 X, int16 Y, Directions dir) { _x = X; _y = Y; _dir = dir; }
111 int _hotspotTextColor;
112 int _pathFindingMaxDepth;
114 Directions _smoothMoveDirection;
117 int _currentSegmentId;
125 int _oldMouseX, _oldMouseY;
140 int avoidObstacle(
int lineIdx,
int lineDataIdx,
int routeIdx,
int destLineIdx,
int destLineDataIdx,
RouteItem *route);
141 int avoidObstacleOnSegment(
int lineIdx,
int lineDataIdx,
int routeIdx,
int destLineIdx,
int destLineDataIdx,
RouteItem *route,
int startLineIdx,
int endLineIdx);
142 int checkInventoryHotspotsRow(
int posX,
int minZoneNum,
bool lastRow);
143 void removeZoneLine(
int idx);
144 void removeLine(
int idx);
145 int checkCollision(
int xp,
int yp);
146 bool checkCollisionLine(
int xp,
int yp,
int *foundDataIdx,
int *foundLineIdx,
int startLineIdx,
int endLineIdx);
147 bool checkSmoothMove(
int fromX,
int fromY,
int destX,
int destY);
148 bool makeSmoothMove(
int fromX,
int fromY,
int destX,
int destY);
149 int characterRoute(
int fromX,
int fromY,
int destX,
int destY,
int startLineIdx,
int endLineIdx,
int routeIdx);
150 int testLine(
int paramX,
int paramY,
int *testValue,
int *foundLineIdx,
int *foundDataIdx);
151 void useRoute0(
int idx,
int curRouteIdx);
152 void useRoute1(
int idx,
int curRouteIdx);
153 void useRoute2(
int idx,
int curRouteIdx);
154 int computeYSteps(
int idx);
155 int computeRouteIdx(
int lineIdx,
int dataIdx,
int fromX,
int fromY,
int destX,
int destY,
int routerIdx,
RouteItem *route);
157 bool MIRACLE(
int fromX,
int fromY,
int lineIdx,
int destLineIdx,
int routeIdx);
158 bool PLAN_TEST(
int paramX,
int paramY,
int superRouteIdx,
int paramStartLineIdx,
int paramEndLineIdx);
165 bool _bobZoneFl[105];
175 void setMaxLineIdx(
int idx);
176 int checkInventoryHotspots(
int posX,
int posY);
177 void addZoneLine(
int idx,
int fromX,
int fromY,
int destX,
int destY,
int bobZoneIdx);
179 void addLine(
int lineIdx, Directions direction,
int fromX,
int fromY,
int destX,
int destY);
181 RouteItem *findRoute(
int fromX,
int fromY,
int destX,
int destY);
182 RouteItem *cityMapCarRoute(
int x1,
int y1,
int x2,
int y2);
183 void clearAllZones();
184 void initSquareZones();
186 void resetLinesNumb();
187 void resetLastLine();
188 void enableZone(
int idx);
189 void disableZone(
int idx);