diff options
author | Andrew Kurushin | 2005-02-26 17:37:16 +0000 |
---|---|---|
committer | Andrew Kurushin | 2005-02-26 17:37:16 +0000 |
commit | 343d59c9d475f932bc2dbd0088cebefca5c56bd5 (patch) | |
tree | 4f8f694145c1e77a6ff5b56d29ca7dc2d839b7b6 /saga/isomap.h | |
parent | 23c2b3fc961d3dbfb6127772f4f026e0e187ad3a (diff) | |
download | scummvm-rg350-343d59c9d475f932bc2dbd0088cebefca5c56bd5.tar.gz scummvm-rg350-343d59c9d475f932bc2dbd0088cebefca5c56bd5.tar.bz2 scummvm-rg350-343d59c9d475f932bc2dbd0088cebefca5c56bd5.zip |
implemented iso pathfinding
glitches: some tiles draws above figures
svn-id: r16935
Diffstat (limited to 'saga/isomap.h')
-rw-r--r-- | saga/isomap.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/saga/isomap.h b/saga/isomap.h index 21e3306d41..185155d3fb 100644 --- a/saga/isomap.h +++ b/saga/isomap.h @@ -66,6 +66,7 @@ namespace Saga { #define SAGA_STRAIGHT_HARD_COST 9 #define SAGA_DIAG_HARD_COST 10 +#define SAGA_MAX_PATH_DIRECTIONS 256 enum TerrainTypes { kTerrNone = 0, @@ -161,7 +162,10 @@ public: position.x = location.u() - location.v() + (128 * SAGA_TILEMAP_W) - _viewScroll.x + 16; position.y = -((location.u() + location.v()) >> 1) + (128 * SAGA_TILEMAP_W) - _viewScroll.y - location.z; } + void screenPointToTileCoords(const Point &position, Location &location); void placeOnTileMap(const Location &start, Location &result, int16 distance, uint16 direction); + void findTilePath(ActorData* actor, const Location &start, const Location &end); + bool nextTileTarget(ActorData* actor); private: void drawTiles(SURFACE *ds, const Location *location); @@ -242,6 +246,8 @@ private: int16 _queueCount; SearchArray _searchArray; + byte _pathDirections[SAGA_MAX_PATH_DIRECTIONS]; + int _viewDiff; Point _viewScroll; |