summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2006-08-05 02:20:34 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2006-08-05 02:20:34 +0000
commitd25e1c9b0dac7fcfe803083af1189489d5a9ad88 (patch)
tree330e30558d62c4de99976305390a976fd5f8d958 /src/engine.cpp
parent97f1e5345cc8a88fed9c65035f2b01fc2eaf9cbd (diff)
downloadmana-d25e1c9b0dac7fcfe803083af1189489d5a9ad88.tar.gz
mana-d25e1c9b0dac7fcfe803083af1189489d5a9ad88.tar.bz2
mana-d25e1c9b0dac7fcfe803083af1189489d5a9ad88.tar.xz
mana-d25e1c9b0dac7fcfe803083af1189489d5a9ad88.zip
Some cleanups, mostly lowering indentation levels.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index b57201a0..01bbbaa2 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -101,11 +101,8 @@ Engine::~Engine()
emotionset->decRef();
itemset->decRef();
- std::vector<Spriteset *>::iterator iter;
- for (iter = weaponset.begin(); iter != weaponset.end(); ++iter)
- {
- (*iter)->decRef();
- }
+ std::for_each(weaponset.begin(), weaponset.end(),
+ std::mem_fun(&Spriteset::decRef));
weaponset.clear();
delete itemDb;
@@ -214,12 +211,12 @@ void Engine::draw(Graphics *graphics)
player_node->mX, player_node->mY,
mouseTileX, mouseTileY);
+ graphics->setColor(gcn::Color(255, 0, 0));
for (PathIterator i = debugPath.begin(); i != debugPath.end(); i++)
{
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));
graphics->drawText(
toString(mCurrentMap->getMetaTile(i->x, i->y)->Gcost),