summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-24 20:15:19 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-02-24 20:15:19 +0000
commit1c4742e530271e10ae949cf7e85402bee867e298 (patch)
treef95927614c4f9a84a507c9425b882f945be6d09f /src/engine.cpp
parent05a12d5568111fa13759026442ed358605bf9a28 (diff)
downloadmana-client-1c4742e530271e10ae949cf7e85402bee867e298.tar.gz
mana-client-1c4742e530271e10ae949cf7e85402bee867e298.tar.bz2
mana-client-1c4742e530271e10ae949cf7e85402bee867e298.tar.xz
mana-client-1c4742e530271e10ae949cf7e85402bee867e298.zip
Another bunch of cosmetic cleanups, ie mostly typedefs...
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 879a6b21..76ed7ac9 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -167,7 +167,7 @@ void Engine::logic()
{
Beings *beings = beingManager->getAll();
// Update beings
- Beings::iterator beingIterator = beings->begin();
+ BeingIterator beingIterator = beings->begin();
while (beingIterator != beings->end())
{
Being *being = (*beingIterator);
@@ -232,21 +232,18 @@ void Engine::draw(Graphics *graphics)
int mouseTileX = mouseX / 32 + camera_x;
int mouseTileY = mouseY / 32 + camera_y;
- std::list<PATH_NODE> debugPath = mCurrentMap->findPath(
+ Path debugPath = mCurrentMap->findPath(
player_node->x, player_node->y,
mouseTileX, mouseTileY);
- while (!debugPath.empty())
+ for (PathIterator i = debugPath.begin(); i != debugPath.end(); i++)
{
- PATH_NODE node = debugPath.front();
- debugPath.pop_front();
-
- int squareX = node.x * 32 - map_x + 12;
- int squareY = node.y * 32 - map_y + 12;
+ int squareX = i->x * 32 - map_x + 12;
+ int squareY = i->y * 32 - map_y + 12;
graphics->setColor(gcn::Color(255, 0, 0));
graphics->fillRectangle(gcn::Rectangle(squareX, squareY, 8, 8));
- MetaTile *tile = mCurrentMap->getMetaTile(node.x, node.y);
+ MetaTile *tile = mCurrentMap->getMetaTile(i->x, i->y);
std::stringstream cost;
cost << tile->Gcost;