summaryrefslogtreecommitdiff
path: root/src/gui/minimap.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-09 19:42:13 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2008-10-09 19:42:13 +0000
commit3fe1772b1e00344365e3cf8204225be19925b9e5 (patch)
tree0f66dddac8e14787096c01368611efa53f453134 /src/gui/minimap.cpp
parent8cc0423b0c0aaa5dd9e91f673a691e5e634988c1 (diff)
downloadmana-client-3fe1772b1e00344365e3cf8204225be19925b9e5.tar.gz
mana-client-3fe1772b1e00344365e3cf8204225be19925b9e5.tar.bz2
mana-client-3fe1772b1e00344365e3cf8204225be19925b9e5.tar.xz
mana-client-3fe1772b1e00344365e3cf8204225be19925b9e5.zip
Merged the movement branch into trunk
I consider this the only way forward. In my tests this code isn't actually doing worse than what was there before. Of course some cases are a bit broken, and I'm open to any kind of feedback so that we can fix those issues.
Diffstat (limited to 'src/gui/minimap.cpp')
-rw-r--r--src/gui/minimap.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index 4e5664d6..ca6f4fd7 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -113,11 +113,12 @@ void Minimap::draw(gcn::Graphics *graphics)
break;
}
- int offset = (dotSize - 1) / 2;
+ const int offset = (dotSize - 1) / 2;
+ const Vector &pos = being->getPosition();
graphics->fillRectangle(gcn::Rectangle(
- being->mX / 64 + getPadding() - offset,
- being->mY / 64 + getTitleBarHeight() - offset,
+ (int) pos.x / 64 + getPadding() - offset,
+ (int) pos.y / 64 + getTitleBarHeight() - offset,
dotSize, dotSize));
}
}