diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-13 02:36:41 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-02-13 02:36:41 +0000 |
commit | ba5dc49d30d6ba465b01dbf3abc933250edcb6c6 (patch) | |
tree | 42f13fe5390c457ea7b32bfdab913fab93bb6d41 /src/graphic | |
parent | 43112ecba9f1584360b4d5e79eee3f183792e544 (diff) | |
download | mana-ba5dc49d30d6ba465b01dbf3abc933250edcb6c6.tar.gz mana-ba5dc49d30d6ba465b01dbf3abc933250edcb6c6.tar.bz2 mana-ba5dc49d30d6ba465b01dbf3abc933250edcb6c6.tar.xz mana-ba5dc49d30d6ba465b01dbf3abc933250edcb6c6.zip |
Fix in calculating G cost in A* implementation.
Diffstat (limited to 'src/graphic')
-rw-r--r-- | src/graphic/graphic.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index da18b109..107c441f 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -502,6 +502,14 @@ void Engine::draw() destRect.h = 8; SDL_FillRect(screen, &destRect, SDL_MapRGB(screen->format, 255, 0, 0)); + Tile *tile = tiledMap.getTile(debugPath->x, debugPath->y); + + std::stringstream cost; + cost << tile->Fcost; + guiGraphics->_beginDraw(); + guiGraphics->drawText(cost.str(), destRect.x - 12, destRect.y + 8); + guiGraphics->_endDraw(); + // Move to the next node PATH_NODE *temp = debugPath->next; delete debugPath; |