diff options
author | lukaslw | 2014-07-10 22:27:39 +0200 |
---|---|---|
committer | lukaslw | 2014-07-10 22:27:39 +0200 |
commit | 0f58b3ac6a71db4556152b987a9d6be783975217 (patch) | |
tree | 0784a705068097e95f082db47c0d34f2b512df57 /engines/prince/prince.h | |
parent | b711899a63e7e98bce9dc9509e9cc4a85486cb41 (diff) | |
download | scummvm-rg350-0f58b3ac6a71db4556152b987a9d6be783975217.tar.gz scummvm-rg350-0f58b3ac6a71db4556152b987a9d6be783975217.tar.bz2 scummvm-rg350-0f58b3ac6a71db4556152b987a9d6be783975217.zip |
PRINCE: Pathfinding - second update
Diffstat (limited to 'engines/prince/prince.h')
-rw-r--r-- | engines/prince/prince.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/engines/prince/prince.h b/engines/prince/prince.h index b9dc249cc3..81c2bf6949 100644 --- a/engines/prince/prince.h +++ b/engines/prince/prince.h @@ -434,6 +434,7 @@ public: // Pathfinding static const int16 kPathGridStep = 2; static const int32 kPathBitmapLen = (kMaxPicHeight / kPathGridStep * kMaxPicWidth / kPathGridStep) / 8; + static const int32 kTracePts = 8000; byte *_roomPathBitmap; // PL - Sala byte *_roomPathBitmapTemp; // PL -SSala @@ -447,6 +448,11 @@ public: int _fpX1; int _fpY1; Direction _direction; + int _coordsBufEnd; + byte *_coordsBuf; // optimal path + byte *_coords; // last path point adress from coordsBuf + int _traceLineLen; + int _traceLineFlag; // return value of plotTraceLine struct fpResult { int x1; @@ -458,10 +464,14 @@ public: bool loadPath(const char *resourceName); void makePath(int destX, int destY); void findPoint(int x1, int y1, int x2, int y2); - bool fpGetPixelAddr(int x, int y); - bool fpGetPixel(int x, int y); + int fpGetPixelAddr(int x, int y); + int fpGetPixel(int x, int y); + int getPixelAddr(byte *pathBitmap, int x, int y); + static void plotTraceLine(int x, int y, int color, void *data); + void specialPlotInside(int x, int y); int tracePath(int x1, int y1, int x2, int y2); Direction makeDirection(int x1, int y1, int x2, int y2); + void specialPlot(int x, int y); void approxPath(); int testAnimNr; |