22 #ifndef SWORD1_ROUTER_H 23 #define SWORD1_ROUTER_H 25 #include "sword1/object.h" 29 #include "common/pack-start.h" 53 #include "common/pack-end.h" 76 #define MAX_FRAMES_PER_CYCLE 16 77 #define NO_DIRECTIONS 8 78 #define MAX_FRAMES_PER_CHAR (MAX_FRAMES_PER_CYCLE * NO_DIRECTIONS) 79 #define ROUTE_END_FLAG 255 81 #define O_GRID_SIZE 200 82 #define O_ROUTE_SIZE 50 88 extern int whatTarget(int32 startX, int32 startY, int32 destX, int32 destY);
93 int32 routeFinder(int32
id,
Object *mega, int32 x, int32 y, int32 dir);
94 void setPlayerTarget(int32 x, int32 y, int32 dir, int32 stance);
106 int32 _playerTargetX, _playerTargetY, _playerTargetDir, _playerTargetStance;
111 int32 _startX, _startY, _startDir;
112 int32 _targetX, _targetY, _targetDir;
113 int32 _scaleA, _scaleB;
119 PathData _modularPath[O_ROUTE_SIZE];
122 int32 _framesPerStep, _framesPerChar;
123 uint8 _nWalkFrames, _nTurnFrames;
124 int32 _dx[NO_DIRECTIONS + MAX_FRAMES_PER_CHAR];
125 int32 _dy[NO_DIRECTIONS + MAX_FRAMES_PER_CHAR];
126 int32 _modX[NO_DIRECTIONS];
127 int32 _modY[NO_DIRECTIONS];
128 int32 _diagonalx, _diagonaly;
130 int32 turnFramesLeft, turnFramesRight;
131 int32 walkFramesLeft, walkFramesRight;
132 int32 slowInFrames, slowOutFrames;
134 bool _slidyWalkAnimatorState;
136 int32 LoadWalkResources(
Object *mega, int32 x, int32 y, int32 dir);
138 int32 checkTarget(int32 x, int32 y);
140 bool scan(int32 level);
141 int32 newCheck(int32 status, int32 x1, int32 x2, int32 y1, int32 y2);
142 bool check(int32 x1, int32 y1, int32 x2, int32 y2);
143 bool horizCheck(int32 x1, int32 y, int32 x2);
144 bool vertCheck(int32 x, int32 y1, int32 y2);
145 bool lineCheck(int32 x1, int32 y1, int32 x2, int32 y2);
150 void slidyWalkAnimator(
WalkData *walkAnim);
152 int32 smoothestPath();
153 void smoothCheck(int32 &steps, int32 best, int32 p, int32 dirS, int32 dirD);
156 int32 solidWalkAnimator(
WalkData *walkAnim);
Definition: animation.h:38
Definition: objectman.h:33